/*
 * @Description: 
 * @Author: Jimmy
 * @Date: 2023-07-23 09:29:54
 * @LastEditTime: 2023-07-24 23:06:09
 * @LastEditors:  
 */

const baseInfo = process.env
console.log(process.env.ENV)

export const config = {
    server: {
        port: baseInfo.SERVER_PORT || 8086
    },
    db: {
        host: baseInfo.DB_HOST,
        name: baseInfo.DB_NAME,
        user: baseInfo.DB_USER,
        password: baseInfo.DB_PASSWORD,
        port: baseInfo.DB_PORT
    },
    jwt: {
        expired: baseInfo.JWT_EXPIRE,
        secret: baseInfo.JWT_SECRET
    },
    mini:{
        appid:baseInfo.MINI_APPID,
        secret:baseInfo.MINI_SECRET
    },
    log: {
        appenders: {
            cheese: { type: "file", filename: "logs/cheese.log" },
            sql: { type: "file", filename: "logs/sql.log" },
            access: { type: "file", filename: "logs/access.log" },
        },
        categories: {
            default: { appenders: ["cheese"], level: "error" },
            sql: { appenders: ["sql"], level: "error" },
            access: { appenders: ["access"], level: "info" },
        }
    }
}